import request from "@/lib/utils/request";
import { PaginationType, Response, ResponseWithPagination } from "../common";
import type { Logininfor, OperLog } from "./log.d";

export const getOperLogListApi = (
  params: PaginationType,
): ResponseWithPagination<OperLog> => {
  return request.get("/monitor/operlog/list", { params });
};

export const clearOperLogApi = (): Response<null> => {
  return request.delete("/monitor/operlog/clean");
};

export const getLogininforListApi = (
  params: PaginationType,
): ResponseWithPagination<Logininfor> => {
  return request.get("/monitor/logininfor/list", { params });
};

export const clearLogininforApi = (): Response<null> => {
  return request.delete("/monitor/logininfor/clean");
};
